import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;

public class java2 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<String>();
        Collections.addAll(list, "张无忌-男-15", "周芷若-女-14", "赵敏-女-13", "张强-男-20", "张三丰-男-100", "张翠山-男-40","张良-男-35","王二麻子-男-35","谢广坤-女-41","林婷-女-22","林立-女-23");

        ArrayList<String> art = new ArrayList<String>();
        int n=0;
        for (String arr:list){
            String[] person=arr.split("-");

            if(Arrays.asList(person).contains("男")){
                char[] name=person[0].toCharArray();
                if(name.length==3){
                    art.add(arr);
                }
            } else  {
                String name=person[0];

                if(name.startsWith("林")){
                    n++;
                    if(n!=1){
                        art.add(arr);
                    }
                }
            }
        }
        System.out.println(art);
    }
}
